package com.ruoyi.project.mahjong.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mahjong.mapper.TSettlementMapper;
import com.ruoyi.project.mahjong.domain.TSettlement;
import com.ruoyi.project.mahjong.service.ITSettlementService;

/**
 * 结算列Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-18
 */
@Service
public class TSettlementServiceImpl implements ITSettlementService 
{
    @Autowired
    private TSettlementMapper tSettlementMapper;

    /**
     * 查询结算列
     * 
     * @param id 结算列ID
     * @return 结算列
     */
    @Override
    public TSettlement selectTSettlementById(Long id)
    {
        return tSettlementMapper.selectTSettlementById(id);
    }

    /**
     * 查询结算列列表
     * 
     * @param tSettlement 结算列
     * @return 结算列
     */
    @Override
    public List<TSettlement> selectTSettlementList(TSettlement tSettlement)
    {
        return tSettlementMapper.selectTSettlementList(tSettlement);
    }

    /**
     * 新增结算列
     * 
     * @param tSettlement 结算列
     * @return 结果
     */
    @Override
    public int insertTSettlement(TSettlement tSettlement)
    {
        tSettlement.setCreateTime(DateUtils.getNowDate());
        return tSettlementMapper.insertTSettlement(tSettlement);
    }

    /**
     * 修改结算列
     * 
     * @param tSettlement 结算列
     * @return 结果
     */
    @Override
    public int updateTSettlement(TSettlement tSettlement)
    {
        tSettlement.setUpdateTime(DateUtils.getNowDate());
        return tSettlementMapper.updateTSettlement(tSettlement);
    }

    /**
     * 批量删除结算列
     * 
     * @param ids 需要删除的结算列ID
     * @return 结果
     */
    @Override
    public int deleteTSettlementByIds(Long[] ids)
    {
        return tSettlementMapper.deleteTSettlementByIds(ids);
    }

    /**
     * 删除结算列信息
     * 
     * @param id 结算列ID
     * @return 结果
     */
    @Override
    public int deleteTSettlementById(Long id)
    {
        return tSettlementMapper.deleteTSettlementById(id);
    }
}
